$(function(){
	getWeather();
	
});
function getWeather(){
	$.get(root+"/weather/show?date="+new Date().getTime(),function(data){
		//var html='<b>'+data.day+'</b>&nbsp;&nbsp;<b>'+data.week+'</b>&nbsp;&nbsp;<b>'+data.cityName+'</b>&nbsp;&nbsp;';
		var html='<b>'+data.cityName+'</b>&nbsp;&nbsp;';
		if(data.weather!='error'){
			html+='<span title="'+data.weather.stateDetailed+'">'+data.weather.weatherImage+'</span>&nbsp;&nbsp;';
			if(data.dn){
				html+='<b>'+data.weather.high+'℃~'+data.weather.low+'℃</b>&nbsp;&nbsp;&nbsp;&nbsp;';
			}else{
				html+='<b>'+data.weather.low+'℃~'+data.weather.high+'℃</b>&nbsp;&nbsp;&nbsp;&nbsp;';
			}			
		}
		$('#weather').html(html);
		$('#sidebar-shortcuts-large').html('<b>'+data.day+'</b>&nbsp;&nbsp;<b>'+data.week+'</b>');
	});
}

